package com.yanqu.road.server.manger.union.listener;

import com.yanqu.road.entity.enums.eUnionSyncType;
import com.yanqu.road.entity.union.cross.CrossUnionInfo;
import com.yanqu.road.entity.union.cross.CrossUnionMember;
import com.yanqu.road.server.manger.ICrossUnionSyncListener;
import com.yanqu.road.server.manger.activity.tonbing.TonBingMgr;
import com.yanqu.road.server.manger.activity.fivehero.FiveHeroMgr;
import com.yanqu.road.server.manger.activity.tonbingchannel.ChannelTonBingMgr;
import com.yanqu.road.server.manger.activity.tongbing.TongBingMgr;

import java.util.List;

public class UnionPositionChangeListener implements ICrossUnionSyncListener {

    @Override
    public void notifySync(int syncType, long playerId, CrossUnionInfo unionInfo, List<CrossUnionMember> memberList) {

        if (syncType == eUnionSyncType.SetPosition.getValue()) {

            TongBingMgr.unionChange(unionInfo.getUnionUid());

            FiveHeroMgr.unionChange(unionInfo.getUnionUid());
            TonBingMgr.unionChange(unionInfo.getUnionUid());
            ChannelTonBingMgr.unionChange(unionInfo.getUnionUid());
        }

    }

}
